<?php

$app->group(['prefix' => 'v1', 'namespace' => 'V1', 'middleware' => ['sign', 'api_cros', 'analysis']], function ($app) {



    /**
     *  Sms API (短信)
     */
    $app->group(['prefix' => 'sms'], function ($app) {
        //注册短信验证码
        $app->post('getCode', ['uses' => 'SmsController@SendCode']);

    });

    /**
     *   短信登录
     */
    $app->group(['prefix' => 'quick'], function ($app) {

        $app->post('login', ['uses' => 'QuickController@login']);

    });

    /**
     *   获取banner
     */
    $app->group(['prefix' => 'banner'], function ($app) {

        $app->post('getBanner', ['uses' => 'BannerController@getBanner']);

    });





    $app->group(['prefix' => 'product'], function ($app) {
        //产品列表
        $app->post('getProduct', ['uses' => 'ProductController@getProduct']);
        //申请点击数
        $app->post('apply', ['middleware' => 'api_token','uses' => 'ProductController@apply']);
        //详请点击数
        $app->post('detail', ['middleware' => 'api_token','uses' => 'ProductController@detail']);
    });


});

